//package com.jhx.demos.web.config;
//
//import com.jhx.demos.web.interceptor.LoginCheckInterceptor;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//@Configuration//配置类
//public class WebConfig implements WebMvcConfigurer {
//
//    @Autowired
//    private LoginCheckInterceptor loginCheckInterceptor;
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(loginCheckInterceptor).addPathPatterns("/**").excludePathPatterns("/login");//注入并添加一个拦截器  拦截所有资源 "/**"
//        //  /*匹配下一级路径  /**匹配任意级路径  /depts/*匹配depts路径下的，不能匹配/emps/1
//
//    }
//}
